package com._23DesignPattern._structure._bridge._new;

import com._23DesignPattern._structure._bridge._new.impl.MessageEmail;
import com._23DesignPattern._structure._bridge._new.impl.MessageImplementot;
import com._23DesignPattern._structure._bridge._new.impl.MessageSMS;

/**
 * @Author: huangya
 * @Date: 2019/9/20
 * @Description:
 */
public class Test1111 {

    public static void main(String[] args) {
        MessageImplementot mi = new MessageSMS();
        AbstractMessage cm = new CommonMessage(mi);
        cm.sendMsg();

        AbstractMessage um = new UrgencyMessage(mi); //222
        um.sendMsg();

        AbstractMessage sum = new SpecialUrgencyMessage(mi);
        sum.sendMsg();


        MessageImplementot me = new MessageEmail();
        AbstractMessage cm2 = new CommonMessage(me);
        cm2.sendMsg();

        AbstractMessage um2 = new UrgencyMessage(me); //222
        um2.sendMsg();

        AbstractMessage sum2 = new SpecialUrgencyMessage(me);
        sum2.sendMsg();
    }
}
